/*
package com.xbsg.protocol.xf.server;

import org.springframework.beans.BeansException;
import org.springframework.beans.factory.config.BeanFactoryPostProcessor;
import org.springframework.beans.factory.config.ConfigurableListableBeanFactory;
import org.springframework.context.ApplicationContext;
import org.springframework.context.ApplicationContextAware;
import org.springframework.stereotype.Component;

*/
/**
 * spring工具类 方便在非spring管理环境中获取bean
 *
 * @author ruoyi
 *//*

@Component
public class SpringUtils implements ApplicationContextAware {
    */
/** Spring应用上下文环境 *//*

    private static ApplicationContext applicationContext = null;

    @Override
    public void setApplicationContext(ApplicationContext applicationContext) throws BeansException {
        if (SpringUtils.applicationContext == null) {
            SpringUtils.applicationContext = applicationContext;
        }

    }
    */
/**
     * 获取对象
     *
     * @param name
     * @return Object 一个以所给名字注册的bean的实例
     * @throws org.springframework.beans.BeansException
     *
     *//*

    @SuppressWarnings("unchecked")
    public static <T> T getBean(String name) throws BeansException
    {
        return applicationContext != null?(T)applicationContext.getBean(name):null;
    }

    */
/**
     * 获取类型为requiredType的对象
     *
     * @param clz
     * @return
     * @throws org.springframework.beans.BeansException
     *
     *//*

    public static <T> T getBean(Class<T> clz) throws BeansException
    {
        return applicationContext != null?applicationContext.getBean(clz):null;
    }


}
*/
